package b1.scenes.fight
{
	import b1.conifg.*;
	import b1.net.*;
	import b1.scenes.*;
	
	import com.greensock.*;
	
	import flash.display.Sprite;
	import flash.events.*;
	import flash.utils.*;
	
	public class Bone extends FightObject
	{
		public var index:int;
		
		public function Bone(index:int)
		{
			super(true);
			this.index = index;
			var boneConfig:ObjectConfig = Config.objectConfigs[index];	
			var boneImgStr:String = boneConfig.iconImage;
			var BoneImg:Class = ResourceHelper.getInstance().getClassByName(boneImgStr);
			var boneImg:Sprite = new BoneImg();
			boneImg.height = boneConfig.boneHeight;
			boneImg.scaleX = boneImg.scaleY;
			addChild(boneImg);
			
			hitPoints = boneConfig.hitPoints;		
		}
		
		public override function destroy():void
		{
			destroyB2Body();
			if (this.parent != null)
				this.parent.removeChild(this);
		}
			
 	}	
}
